package com.coldchain.common.feign;

import com.coldchain.common.auth.AuthUser;
import com.coldchain.common.msg.ObjectRestResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;



@FeignClient(value="ch-cys")
public interface CysFeign {

	/**
	 * 验证承运商登录
	 *
	 * @author TianPeng
	 * <p>
	 * 2018年9月12日
	 */
	@RequestMapping(value = "/cys/cys/validateCysLogin", method = {RequestMethod.POST})
	public ObjectRestResponse<AuthUser> validateCysLogin(@RequestParam("username") String username
			, @RequestParam("password") String password);

	/**
	 * 承运商 id 查询
	 *
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/cys/cys/showCysDetail/{id}", method = {RequestMethod.GET})
	public ObjectRestResponse<Object> showCysDetail(@PathVariable("id") Long id);
}


